package com.ruoyi.logistics.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.logistics.mapper.TLogisticsMapper;
import com.ruoyi.logistics.domain.TLogistics;
import com.ruoyi.logistics.service.ITLogisticsService;

/**
 * 物流管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-12
 */
@Service
public class TLogisticsServiceImpl implements ITLogisticsService 
{
    @Autowired
    private TLogisticsMapper tLogisticsMapper;

    /**
     * 查询物流管理
     * 
     * @param logisticsId 物流管理主键
     * @return 物流管理
     */
    @Override
    public TLogistics selectTLogisticsByLogisticsId(Long logisticsId)
    {
        return tLogisticsMapper.selectTLogisticsByLogisticsId(logisticsId);
    }

    /**
     * 查询物流管理列表
     * 
     * @param tLogistics 物流管理
     * @return 物流管理
     */
    @Override
    public List<TLogistics> selectTLogisticsList(TLogistics tLogistics)
    {
        return tLogisticsMapper.selectTLogisticsList(tLogistics);
    }

    /**
     * 新增物流管理
     * 
     * @param tLogistics 物流管理
     * @return 结果
     */
    @Override
    public int insertTLogistics(TLogistics tLogistics)
    {
        tLogistics.setCreateTime(DateUtils.getNowDate());
        return tLogisticsMapper.insertTLogistics(tLogistics);
    }

    /**
     * 修改物流管理
     * 
     * @param tLogistics 物流管理
     * @return 结果
     */
    @Override
    public int updateTLogistics(TLogistics tLogistics)
    {
        tLogistics.setUpdateTime(DateUtils.getNowDate());
        return tLogisticsMapper.updateTLogistics(tLogistics);
    }

    /**
     * 批量删除物流管理
     * 
     * @param logisticsIds 需要删除的物流管理主键
     * @return 结果
     */
    @Override
    public int deleteTLogisticsByLogisticsIds(Long[] logisticsIds)
    {
        return tLogisticsMapper.deleteTLogisticsByLogisticsIds(logisticsIds);
    }

    /**
     * 删除物流管理信息
     * 
     * @param logisticsId 物流管理主键
     * @return 结果
     */
    @Override
    public int deleteTLogisticsByLogisticsId(Long logisticsId)
    {
        return tLogisticsMapper.deleteTLogisticsByLogisticsId(logisticsId);
    }
}
